<?php

/* @var $this \yii\web\View */
/* @var $content string */

use yii\helpers\Html;
use yii\helpers\Url;
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet">
    <script src="/static/js/jquery-1.12.4.js"></script>
    <script src="/static/bootstrap/js/bootstrap.js"></script>
    <script src="/static/layer/layer.js"></script>
</head>
<body>
<?php $this->beginBody() ?>

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="<?php echo Url::toRoute('site/index');?>">获客推送管理</a>
        </div>


        <?php
        $status = yii::$app->request->get('status');
        ?>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="<?php if(!$status) echo 'active';?>"><a href="<?php echo Url::toRoute(['site/index'])?>">全部</a></li>
                <li class="<?php if($status==1) echo 'active';?>"><a href="<?php echo Url::toRoute(['site/index','status'=>'1'])?>" >推送成功</a></li>
                <li class="<?php if($status==2) echo 'active';?>"><a href="<?php echo Url::toRoute(['site/index','status'=>'2'])?>" >推送失败</a></li>
                <li class="<?php if($status==3) echo 'active';?>"><a href="<?php echo Url::toRoute(['site/index','status'=>'3'])?>" >已审核</a></li>
                <li class="<?php if($status==4) echo 'active';?>"><a href="<?php echo Url::toRoute(['site/index','status'=>'4'])?>" >待审核</a></li>
            </ul>
            <form class="navbar-form navbar-left" method="get">
                <input type="hidden" name="status" value="<?php echo Yii::$app->request->get('status',0);?>"/>
                <input type="hidden" name="r" value="site/index" />
                <div class="form-group">
                    <input type="text" class="form-control" name="keyword" placeholder="手机号或姓名"/>
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
                <a href="<?php echo Url::toRoute('site/upload');?>" class="btn btn-success">上传新数据</a>
            </form>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

<div class="wrap" style="padding:10px;">

        <?php echo $content ?>

</div>

<footer class="footer">
    <div class="container">
        <p class="pull-left">&copy; <?= date('Y') ?></p>
        <p class="pull-right">获客数据</p>
    </div>
</footer>

<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
